home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Magazin / Future-PD / CTWHelpFile.hyper < prev    next >
Text File  |  1998-01-30  |  11KB  |  448 lines

  1. {:intro}
  2. {^}The CTW Engine Editor By Internext Software
  3. {^}Programmed By John Bintz
  4. {^}Hypertext Document By John Bintz
  5. {^}================================
  6.  
  7. {>commands}Script Commands
  8. {>constr}Script Constructs
  9. {>format}File Formats
  10. {>info}Information
  11.  
  12. This puppy is Hypertexted.  Just start clicking!
  13.  
  14. {:commands}
  15. {/2}=============================================
  16. {/3}CTW Engine Scripting Commands
  17. {/2}=============================================
  18.  
  19. Remember to end all script lines with pipes (|)!
  20.  
  21. {>PAUSE}Jump Down A Couple
  22. {>WAIT}Jump Down Some More
  23. {>ITEMSPEC}Jump Down Even More
  24. {>CHANGEFRAMEBASE}Jump To The End
  25. {>intro}Jump Back To Intro
  26.  
  27. {::}
  28. {/7}:Label
  29. Set a Label to jump to within a program.
  30.  
  31. {:[}
  32. {/7}[ Text Params...
  33. Display some text.  Parameters are labelled in the text
  34. string as %1 on.
  35.  
  36. {:]}
  37. {/7}] Text Label
  38. Make a text menu mption.  Jump to Label if selected.
  39.  
  40. {:SET}
  41. {/7}SET Variable Value
  42. Set The Variable To Value
  43.  
  44. {:MATH}
  45. {/7}MATH Value Op Value Variable
  46. {/7}MATH Variable Op Value
  47. Perform a mathematical operation.  Form one places Result into different
  48. Variable, while form two places Result into first Variable.
  49.  
  50. OP is any of the following operators:
  51.  
  52. {/5}  +            Addition
  53. {/5}  -         Subtraction
  54. {/5}  *      Multiplication
  55. {/5}  /            Division
  56. {/5}  %  Division Remainder
  57.  
  58. {:PAUSE}
  59. {/7}PAUSE Seconds
  60. Pause the script for Seconds
  61.  
  62. {:GOTO}
  63. {/7}GOTO Label
  64. Goto the Label in the program
  65.  
  66. {:ONGOTO}
  67. {/7}ONGOTO Base Offset Labels...
  68. Jump to the Label specified, starting at 1, from the formula Offset-Base.
  69. Example:
  70.  
  71. {/6}ONGOTO 4 6 JUMPNOW JUMPLATER JUMPNEVER
  72.   would send the script to the label JUMPNEVER
  73.   
  74. {:LABELJUMP}
  75. {/7}LABELJUMP Character Label
  76. Jump a Character's script (identified by their position in the CHARZ block,
  77. starting at zero) to Label.
  78.  
  79. {:WALK}
  80. {/7}WALK Direction Speed
  81. Walk at a given Speed (in pixels) in the following directions:
  82.  
  83. {/5}  0            Up
  84. {/5}  1          Down
  85. {/5}  2          Left
  86. {/5}  3         Right
  87.  
  88. {:WALKTO}
  89. {/7}WALKTO X Y Speed There
  90. Walk to a specific point (X,Y) on the map at Speed pixels per step.  When
  91. you reach it, There is true.
  92.  
  93. {:IF}
  94. {/7}IF Variable Op Value Label
  95. {/7}IF Variable Label
  96. The first form uses an Operand to determine trueness, while the second
  97. check if Variable is true.  In either case, if the result is true, the
  98. script jumps to Label.  The Operands for form one:
  99.  
  100. {/5}  >             Greater Than
  101. {/5}  <                Less Than
  102. {/5}  => >=   Greater Than/Equal
  103. {/5}  <= =<      Less Than/Equal
  104. {/5}  =                 Equal To
  105. {/5}  <>            Not Equal To
  106.  
  107. {:WAIT}
  108. {/7}WAIT Clicks
  109. Wait for Clicks/50th of a second
  110.  
  111. {:RND}
  112. {/7}RND Variable UpperBound
  113. Put a random number into Variable from 0-UpperBound
  114.  
  115. {:TIMER}
  116. {/7}TIMER Variable
  117. Put into Variable the number of clicks since powerup
  118.  
  119. {:GLOSET}
  120. {:GLOGET}
  121. {/7}GLOSET GlobalVariable Value
  122. {/7}GLOGET GlobalVariable Variable
  123. These commands set and get Global Variables, a set of 256 variables that 
  124. travel between scripts.
  125.  
  126. {:BITSET}
  127. {:BITCLR}
  128. {:BITCHG}
  129. {/7}BITSET Varibale Bit
  130. {/7}BITCLR Variable Bit
  131. {/7}BITCHG Variable Bit
  132. These set, clear, or change a bit in a variable.  Variables have 32 bits from
  133. 0-31.
  134.  
  135. {:BITGET}
  136. {/7}BITGET Variable Bit Result
  137. Result is true if Bit in Variable is set.
  138.  
  139. {:ADDITEM}
  140. {/7}ADDITEM Name
  141. Add the item Name to the player's inventory.
  142.  
  143. {:HAVEITEM}
  144. {/7}HAVEITEM Name Result
  145. If the player has item Name, Result is true.
  146.  
  147. {:TAKEITEM}
  148. {/7}TAKEITEM Name Result
  149. If the player has item Name, Result is true and the item is removed from the
  150. player's inventory.
  151.  
  152. {:ITEMSPEC}
  153. {/7}ITEMSPEC Name Value Result
  154. Get the specs for an item:
  155.  
  156. {/5}  WP           Weapon Power
  157. {/5}  AP            Armor Power
  158. {/5}  HP    Hit Points Restored
  159. {/5}  COST            Item Cost
  160. {/5}  TYPE         Type Of Item
  161. {/2}                     0         Weapon
  162. {/2}                     1          Armor
  163. {/2}                     2            Hat
  164. {/2}                     3         Gloves
  165. {/2}                     4    Restores HP
  166. {/2}                     5+        Custom
  167.  
  168. {:KILL}
  169. {/7}KILL
  170. Kill a character and end the script
  171.  
  172. {:LOADLEVEL}
  173. {/7}LOADLEVEL Levelname
  174. Load the level Levelname
  175.  
  176. {:ATTACK}
  177. {/7}ATTACK Group
  178. Cause the Group to attack the player
  179.  
  180. {:BUY}
  181. {/7}BUY Item Result
  182. Buy Item for a certain amount of money.  If the player has enough money, Result
  183. is true and the player gets the item.
  184.  
  185. {:SELL}
  186. {/7}SELL Item Result
  187. Try to sell the player's Item.  If the player has the item, he sells it for its
  188. total price and Result is true.
  189.  
  190. {:RATINGSET}
  191. {:RATINGGET}
  192. {/7}RATINGSET Rating Value
  193. {/7}RATINGGET Rating Value
  194. Get or set a rating from the player:
  195.  
  196. {/5}  HP           Hit Points
  197. {/5}  MHP      Max Hit Points
  198. {/5}  STR            Strength
  199. {/5}  DEX           Dexterity
  200. {/5}  INT        Intelligence
  201. {/5}  CRED            Credits
  202. {/5}  EXP          Experience
  203.  
  204. {:CHANGEFRAMEBASE}
  205. {/7}CHANGEFRAMEBASE FrameSet
  206. Change a character's Frame Set to FrameSet
  207.  
  208. {:COORDS}
  209. {/7}COORDS Char X Y
  210. Get the coordinates of character Char into X and Y
  211.  
  212. {:MOVETO}
  213. {/7}MOVETO X Y
  214. Move a character to (X,Y)
  215.  
  216. {:FRAMEANIM}
  217. {/7}FRAMEANIM FrameSet
  218. Animate the character with FrameSet, then continue
  219.  
  220. {:ITEMREMOVE}
  221. {:ITEMISGONE}
  222. {:ITEMKILL}
  223. {:ITEMPUTBACK}
  224. {/7}ITEMREMOVE Which
  225. {/7}ITEMISGONE Which Result
  226. {/7}ITEMKILL Which
  227. {/7}IITEMPUTBACK Which
  228. These commands use a bunch of Global Variables to keep track of individual 
  229. item scripts.  When a player takes an item, ITEMREMOVE it.  Then, add to the
  230. beginning of the item's script an ITEMISGONE request.  If the Result is
  231. True, KILL the item.  ITEMPUTBACK changes the item's state.  ITEMKILL combines
  232. ITEMREMOVE and KILL.
  233.  
  234. {:MENURESET}
  235. {:MENUADD}
  236. {:MENUCHOICE}
  237. {/7}MENURESET
  238. {/7}MENUADD Short Long
  239. {/7}MENUCHOICE Result
  240. These commands let you use circular menus, such as the player's menu.  
  241. MENURESET first, then add commands, giving the short (rotated) string, then 
  242. the long (bottom of screen descriptor) string.  MENUCHOICE returns the number 
  243. of the item, starting from zero.
  244.  
  245. {:TOGGLETOUCH}
  246. {/7}TOGGLETOUCH
  247. Change the script's ability to jump to :TOUCH when touched.
  248.  
  249. {:KEYDOWN}
  250. {/7}KEYDOWN Key Result
  251. Check to see if Key is being pressed.  If it is, Result is true.
  252.  
  253. {:SOUND}
  254. {/7}SOUND File Frequency Voices
  255. Play sound File on disk at Frequency through Voices:
  256.  
  257. {/5}  %0123
  258. {/5}  0 and 2 are Left Channels
  259. {/5}  1 and 3 are Right Channels
  260.  
  261. {:TOGGLEDISPLAY}
  262. {/7}TOGGLEDISPLAY
  263. Toggle display updating on and off.
  264.  
  265. {:FADEIN}
  266. {:FADEOUT}
  267. {/7}FADEIN Time
  268. {/7}FADEOUT Time
  269. Fade in and out the screen for 15*Time/50 Seconds
  270.  
  271. {:LOCKCONTROLS}
  272. {:UNLOCKCONTROLS}
  273. {/7}LOCKCONTROLS
  274. {/7}UNLOCKCONTROLS
  275. Prevent or allow the player to move.
  276.  
  277. {:constr}
  278. {/2}=========================================
  279. {/5}Useful Script Constructions
  280. {/2}=========================================
  281.  
  282. {>intro}Jump Back To Introduction
  283.  
  284. {/4}WalkLoops
  285. A character will walk around a bunch of different points, all set in the
  286. script:
  287.  
  288. {/2}SET @WALKLOOP 0|
  289. {/2}:WALKLOOP|
  290. {/2}ONGOTO 0 @WALKLOOP POINT1 POINT2 ...
  291.  
  292. {/2}:POINT1|
  293. {/2}WALKTO X Y SPEED @THERE|
  294. {/2}IF @THERE NEXTPOINT|
  295. {/2}GOTO WALKLOOP|
  296.  
  297. {/2}:NEXTPOINT|
  298. {/2}MATH @WALKLOOP + 1|
  299. {/2}MATH @WALKLOOP % POINTS|
  300. {/2}GOTO WALKLOOP|
  301.  
  302. {/4}Text Menus
  303. Text Menus are menus put directly upon the text window.  They are useful when
  304. selecting between Yes/No answers or Buy/Sell options:
  305.  
  306. {/2}[ "Hello There!"|
  307. {/2}[ "Do you like it here?"|
  308. {/2}] "Yes I Do" YES|
  309. {/2}] "No I Don't" NO|
  310. {/2}GOTO END|
  311.  
  312. {/2}:YES|
  313. {/2}[ "That's good!"|
  314. {/2}GOTO END|
  315.  
  316. {/2}:NO|
  317. {/2}[ "Well, then I'll have to DESTROY YOU!"|
  318. {/2}ATTACK|
  319. {/2}GOTO END|
  320.  
  321. {/4}Circluar Menus
  322. Circular menus are the menus that rotate around the character, and are very
  323. useful when you have more than three choices:
  324.  
  325. {/2}MENURESET|
  326. {/2}MENUADD "Buy" "Buy A Weapon"|
  327. {/2}MENUADD "Sell" "Sell A Weapon"|
  328. {/2}MENUADD "Leave" "Leave The Store"|
  329. {/2}MENUCHOICE @RESULT|
  330. {/2}ONGOTO 0 @RESULT BUY SELL LEAVE|
  331.  
  332. {/4}Global Variables
  333. Global variables create storylines.  They travel between levels and are
  334. useful for keeping track of what you've done:
  335.  
  336. {/2}GLOGET 0 @CURRPOS|
  337. {/2}IF @CURRPOS = 4 STORY4|
  338. {/2}IF @CURRPOS = 3 STORY3|
  339. {/2}IF @CURRPOS = 2 STORY2|
  340. {/2}IF @CURRPOS = 1 STORY1|
  341.  
  342. {:format}
  343. {/2}================================